﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WPFWebControl
{
    public class bannerItem : INotifyPropertyChanged
    {
        
        private string _realLink;
        public string RealLink
        {
            get
            {
                return _realLink;
            }
            set
            {
                if (_realLink != value)
                {
                    _realLink = value;
                    OnPropertyChanged("RealLink");

                }
            }
        }

        private int _index;
        public int Index
        {
            get { return _index; }
            set
            {
                if (_index != value)
                {
                    _index = value;
                    OnPropertyChanged("Index");
                }
            }
        }


        public override string ToString()
        {
            return _realLink;
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged(string info)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this, new PropertyChangedEventArgs(info));
            }
        }

        #endregion

    }
}
